<?php $this->_extends('../_layouts/default_layout'); ?>
<?php $this->_block('contents'); ?>
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/jq.mselect.js?"></script>
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url');?>js/validator.js"></script>
<script type="text/javascript" >
$(function(){
	var product_categories_data = <?=$product_categories?>;
	$(document).mselect(product_categories_data, 'product_categories_id', 'product_categories_id', 0);
	$("form").submit(function(){  
		var flag = Validator.Validate(this,3);
		if (flag)
		{
			 $("#submit").attr("disabled","disabled");  
		}
		return flag;
	}); 
});
</script>
<form action="<?=url('Product::Counter/NumberCreateSave'); ?>" method="post" >
<table class="form_table">
	<tr>
		<th>选择分类</th>
		<td><input type="hidden" id="product_categories_id" name="product_categories_id" dataType="Require" msg="请选择分类"/> <span class="red">*</span></td>
	</tr>
	<tr>
		<th>数量</th>
		<td><input type="text" id="quantity" name="quantity" dataType="Require" msg="请填写数量" /> <span class="red">*</span></td>
	</tr>
	<tr>
		<th>重量</th>
		<td><input type="text" name="weight" /> g</td>
	</tr>
	<tr>
		<td></td>
		<td><input type="submit" id="submit" class="button" value="生成编号" /><input type="hidden" name="<?=Q::ini('unique_token_name');?>" value="<?=Helper_BSS_Normal::genToken();?>"/></td>
	</tr>
</table>
</form>
<?php $this->_endblock();?>